<?php
require_once '../inc/configuration.php';
require_once '../inc/connexion_bd.php';
?>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php

 
        $sql = "SELECT * FROM rendez_vous";
    
        $req = mysqli_query($connexion_serveur, $sql); 
        
        $nbre_total = mysqli_num_rows($req);
        ?>
        
        <form>
            <h2>LISTE DES RENDEZ-VOUS</h2>
            <h3>Nombre de rendez-vous affichés: <?php echo $nbre_total; ?></h3>  
        <?php
       while($resultats = mysqli_fetch_assoc($req)) {?>
        
            
            
            <table>
                <tr>
                    <td>n°</td>
                    <td><?php echo $resultats["id"]; ?></td>
                </tr>
                 <tr>
                    <td>Objet</td>
                    <td><?php echo $resultats["objet"]; ?></td>
                </tr>
                <tr>
                    <td>Date</td>
                    <td><?php echo $resultats["rdv_date"]; ?></td>
                </tr>
               <tr>
                    <td>Heure</td>
                    <td><?php echo $resultats["heure"]; ?></td>
                </tr>
                <tr>
                    <td>Contact</td>
                    <td><?php echo $resultats["id_contact"]; ?></td>
                </tr>
                      <tr>
                    <td>Observations</td>
                    <td><?php echo $resultats["observations"]; ?></td>
                </tr>
            </table>
            
            
      <?php 
      
      } ?>
        
        ?>
    </body>
</html>
